package com.sdx.console.product.entity;

import java.util.Date;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Null;

import com.fasterxml.jackson.annotation.JsonIgnore;
import org.beetl.sql.core.annotatoin.ColumnIgnore;
import org.beetl.sql.core.annotatoin.AutoID;
import org.beetl.sql.core.annotatoin.SeqID;
import org.apache.commons.lang3.StringUtils;
import com.ibeetl.admin.core.util.ValidateConfig;
import com.sdx.service.ConfigService;

import org.beetl.sql.core.TailBean;
import java.math.*;

import com.ibeetl.admin.core.annotation.Dict;
import com.ibeetl.admin.core.entity.BaseEntity;

import org.beetl.sql.core.annotatoin.InsertIgnore;
import org.beetl.sql.core.annotatoin.Version;
import org.beetl.sql.core.annotatoin.LogicDelete;
import com.sdx.common.utils.Utils;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import lombok.Data;

/*
*
* gen by Spring Boot2 Admin 2019-04-09
*/
@JsonSerialize(include=JsonSerialize.Inclusion.NON_NULL)
@Data
public class SaleProduct extends BaseEntity{

    //商品id
    @NotNull(message = "ID不能为空", groups =ValidateConfig.UPDATE.class)
    @AutoID
    private Integer productId ;

    //商品类型 985，高考作文及提分
    private Integer productType ;

    //商品名称
    private String productName ;

    //商品描述
    private String productDesc ;

    //商品备注
    private String productMemo ;

    private String bookIds;

    //商品价格
    private Integer productPrice ;

    //原价
    private Integer costPrice ;

    //商品库存
    private Integer inventory ;

    //商品已售基数
    private Integer baseSales ;

    //商品图
    private String cover ;

    private String introImg;

    //邮费 分
    private Integer postage;

    //可用标记 1、可用，0、不可用
    private Integer productStatus ;

    //创建人
    private Integer createdBy ;

    //创建人名称
    private String createdName ;

    //创建时间
    private Date createdTime ;

    //更新人
    private Integer updatedBy ;

    //更新人名称
    private String updatedName ;

    //更新时间
    private Date updatedTime ;

	public String getCoverView(){
		return Utils.imageUrl(cover);
	}

	// 发货地址
    private String consignAddress;

}
